Skip to content

ci: run statement tests against sqlite and postgresql drivers - #9

Open
fornwall wants to merge 1 commit into
mainfrom
ci/driver-smoke-tests
Open

ci: run statement tests against sqlite and postgresql drivers#9
fornwall wants to merge 1 commit into
mainfrom
ci/driver-smoke-tests

Conversation

@fornwall

Copy link
Copy Markdown
Owner

Motivation

CI currently only runs the framework's own unit tests (uv run pytest -vs tests/ in .github/workflows/test.yaml) — no ADBC driver is ever exercised. Changes to the validation suite get zero real-driver execution before merging; driver repositories only run the suite at their pinned revision, so breakage is discovered late.

What this adds

A minimal, CI-only smoke harness under smoke/ (not shipped as part of the package) plus a new Driver Smoke Test workflow that runs the driver-facing statement tests (adbc_drivers_validation/tests/statement.py) against two real drivers:

  • sqlite job: the released adbc-driver-sqlite PyPI wheel against a local SQLite database file.
  • postgresql job: the released adbc-driver-postgresql PyPI wheel against a postgres:18 service container.

The harness (smoke/tests/) defines minimal SQLiteQuirks/PostgreSQLQuirks (only what the statement tests need), re-exports the shared fixtures from adbc_drivers_validation.tests.conftest, and selects the driver via the SMOKE_DRIVER environment variable so one harness serves both jobs. Statement tests only for now — query/ingest/connection tests need per-vendor query corpora and fuller quirks, and can be layered on later.

Supporting tweaks:

  • pyproject.toml: scope setuptools package discovery to adbc_drivers_validation* (the new top-level smoke/ directory otherwise breaks flat-layout auto-discovery).
  • pytest.ini: set testpaths = tests so a bare pytest run keeps collecting only the framework unit tests; the smoke tests use their own smoke/pytest.ini.
  • .rat-excludes: exclude the empty smoke/queries/.gitkeep placeholder.

Local verification

  • SQLite job command: 6 passed, 1 skipped (test_execute_schema_noalias — the released wheel raises NOT_IMPLEMENTED for execute_schema).
  • PostgreSQL job command against a local postgres:18 container: all 7 statement tests passed (test_parameter_execute, test_parameter_schema, test_prepare, test_execute_schema_noalias, test_rows_affected, test_transaction_toggle, test_nonascii_queries).
  • uv run pytest -vs tests/: 211 passed, 1 skipped.
  • uv run ty check: clean.
  • pre-commit run --all-files: all hooks pass (including Apache RAT license check).
  • uvx zizmor .github/workflows/driver-smoke.yaml: no findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VsDgjiYuJYrp59oto64m9D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant